import json

import requests

# 设置目标POST接口的URL
url = 'http://10.1.16.50:11051/file/getFileDir'  # 将URL替换为实际的接口地址
token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoIjoiY3VwYi1maWxlLXRvb2wtZHBpcGUtbmV0c2ltLWJsYWNrb2lsLXB2dCIsImV4cCI6MTc5NjIxMjYwMiwidXNlcklkIjoia3EifQ.wdKJhUxxtW8Y0l1Yn_-CDCI-ZonFcODPHzdFk5uSFNc'
headders = {'myToken': token}

response = requests.get(url, verify=False, headers=headders)
if response.status_code == 200:
    print('在线文件查询成功:')
    # print(response.text)  # 如果服务器返回有用的信息，可以打印它
    data = json.loads(response.text)
    data = data['data']
    if data:
       print(data)
else:
    print("查询失败")
